﻿<?xml version="1.0"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Blazing.BusinessObjects" namespace="Blazing.BusinessObjects.Locations" >
	<class name="Location" table="locations" lazy="false" dynamic-insert="true" dynamic-update="true">

		<id name="ID" column="locationid" type="Int32">
			<generator class="native" />
		</id>
		<timestamp column="rowstamp" name="RowStamp" />

		<property name="Nameshort" length="25" not-null="true" />
		<property name="Namelong" length="50" />
		<property name="Abbr" length="10" />
		<many-to-one name="ParentLocation" column="parentid" class="Location" />

    <set name="LocationTaxonomyTags" table="locationpagetaxonomytags">
      <key column="locationid"/>
      <many-to-many class="Blazing.BusinessObjects.Tagging.TaxonomyTag" column="taxonomytagid"/>
    </set>

    <many-to-one name="Geocode" column="geocodeid" class="Blazing.BusinessObjects.Cms.Geocode" cascade="save-update" />

  </class>
</hibernate-mapping>
